package com.hzf.wxplatform.dao.model;

import java.io.Serializable;
import java.util.List;

public class WxplatformWxmenu implements Serializable {
    /**
     * 按钮编号
     *
     * @mbg.generated
     */
    private Integer id;

    /**
     * 按钮类型
     *
     * @mbg.generated
     */
    private String type;

    /**
     * 按钮名称
     *
     * @mbg.generated
     */
    private String name;

    /**
     * cleck类型必填
     *
     * @mbg.generated
     */
    private String keyType;

    /**
     * view类型必选
     *
     * @mbg.generated
     */
    private String url;

    /**
     * 静态资源
     *
     * @mbg.generated
     */
    private String mediaId;

    /**
     * 小程序
     *
     * @mbg.generated
     */
    private String appid;

    /**
     * 小程序路径
     *
     * @mbg.generated
     */
    private String pagepath;
    /**
     * 小程序路径
     *
     * @mbg.generated
     */
    private List <WxplatformWxmenu> wxplatformWxmenus;

    /**
     * 上级menu一级为空
     *
     * @mbg.generated
     */
    private Integer menuId;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getKeyType() {
        return keyType;
    }

    public void setKeyType(String keyType) {
        this.keyType = keyType;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getMediaId() {
        return mediaId;
    }

    public void setMediaId(String mediaId) {
        this.mediaId = mediaId;
    }

    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getPagepath() {
        return pagepath;
    }

    public void setPagepath(String pagepath) {
        this.pagepath = pagepath;
    }

    public Integer getMenuId() {
        return menuId;
    }

    public void setMenuId(Integer menuId) {
        this.menuId = menuId;
    }

    public List<WxplatformWxmenu> getWxplatformWxmenus() {
        return wxplatformWxmenus;
    }

    public void setWxplatformWxmenus(List<WxplatformWxmenu> wxplatformWxmenus) {
        this.wxplatformWxmenus = wxplatformWxmenus;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", type=").append(type);
        sb.append(", name=").append(name);
        sb.append(", keyType=").append(keyType);
        sb.append(", url=").append(url);
        sb.append(", mediaId=").append(mediaId);
        sb.append(", appid=").append(appid);
        sb.append(", pagepath=").append(pagepath);
        sb.append(", menuId=").append(menuId);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WxplatformWxmenu other = (WxplatformWxmenu) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getKeyType() == null ? other.getKeyType() == null : this.getKeyType().equals(other.getKeyType()))
            && (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl()))
            && (this.getMediaId() == null ? other.getMediaId() == null : this.getMediaId().equals(other.getMediaId()))
            && (this.getAppid() == null ? other.getAppid() == null : this.getAppid().equals(other.getAppid()))
            && (this.getPagepath() == null ? other.getPagepath() == null : this.getPagepath().equals(other.getPagepath()))
            && (this.getMenuId() == null ? other.getMenuId() == null : this.getMenuId().equals(other.getMenuId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getKeyType() == null) ? 0 : getKeyType().hashCode());
        result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode());
        result = prime * result + ((getMediaId() == null) ? 0 : getMediaId().hashCode());
        result = prime * result + ((getAppid() == null) ? 0 : getAppid().hashCode());
        result = prime * result + ((getPagepath() == null) ? 0 : getPagepath().hashCode());
        result = prime * result + ((getMenuId() == null) ? 0 : getMenuId().hashCode());
        return result;
    }
}